import request from '@/utils/request'

// 查询产品工序列表
export function listProductProcess(query) {
  return request({
    url: '/erp/productProcess/list',
    method: 'get',
    params: query
  })
}

// 查询产品工序详细
export function getProductProcess(id) {
  return request({
    url: '/erp/productProcess/' + id,
    method: 'get'
  })
}

// 查询产品工序详细内容id
export function getproductTechnology(id) {
  return request({
    url: '/erp/productTechnology/' + id,
    method: 'get'
  })
}

// 新增产品工序
export function addProductProcess(data) {
  return request({
    url: '/erp/productProcess',
    method: 'post',
    data: data
  })
}

// 修改产品工序
export function updateProductProcess(data) {
  return request({
    url: '/erp/productProcess',
    method: 'put',
    data: data
  })
}

// 删除产品工序
export function delProductProcess(id) {
  return request({
    url: '/erp/productProcess/' + id,
    method: 'delete'
  })
}

// 预览文件



export function exportWorkCard1(data) {
  return request({
    url: '/erp/productTechnologyVersions/exportWorkCard1',
    method: 'post',
    data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    // responseType: "blob",
  })
}
